home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
pcfig4th.zip
/
ARRAYS.SCR
< prev
next >
Wrap
Text File
|
1985-04-23
|
2KB
|
1 lines
1 and 2 dimensional arrays ( 1 and 2 dimensional array definitions ) FORTH DEFINITIONS : ARRAY ( compile: n -- ; exec: n -- addr ) <BUILDS DUP , DUP + ALLOT DOES> (ARRAY) ; : STRING ( compile: n -- ; exec: n -- addr ) <BUILDS DUP , ALLOT DOES> (CARR) ; : 2ARRAY ( compile: rows cols -- ; exec: row col -- addr ) <BUILDS 2DUP , , * DUP + ALLOT DOES> (2ARR) ; : STRINGS ( compile: n maxlen -- ; exec: n char -- addr ) <BUILDS SWAP 2DUP , , * ALLOT DOES> (2CARR) ;